<?php
class DataProvider
{
public static function ExecuteQuery($sql)
{
$connection = mysql_connect("localhost","root","") or
die ("couldn't connect to localhost");
mysql_select_db("gameStore",$connection);
mysql_query("set names 'utf8'");
$result = mysql_query($sql,$connection);
mysql_close($connection);
return $result;
}
public static function ExecuteQueryGetID($sql)
{
$connection = mysql_connect("localhost","root","") or
die ("couldn't connect to localhost");
mysql_select_db("gameStore",$connection);
mysql_query("set names 'utf8'");
$result = mysql_query($sql,$connection);
$id = (string)mysql_insert_id();
mysql_close($connection);

return $id;
}
}
?>